-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include spaces in the list info #7926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, this PR can't go into the stable branch because of changes in or additional translation strings. Up to you if you want to make two different PRs for stable and master, or only point this PR to master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase please :-) Found some small issues, please see comments.
@@ -37,7 +48,8 @@ export default { | |||
}, | |||
computed: { | |||
items() { | |||
return this.files + this.folders | |||
const filesAndFolderCount = this.files + this.folders | |||
return this.showSpaces ? filesAndFolderCount + this.spaces : filesAndFolderCount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not single line as follows?
return this.files + this.folders + (this.showSpaces ? this.spaces : 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And more radical: isn't this.spaces
always 0
if this.showSpaces
evaluates to false
? In that case you could just do
return this.files + this.folders + this.spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this.spaces always 0 if this.showSpaces evaluates to false?
Technically, this.spaces
could be >0
while showSpaces
is still false
. I don't like those 2 props to be "linked" together like this... The first suggestion is nice though.
b600815
to
071e81b
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
Spaces have been included in the list info below file lists that support displaying spaces.
Related Issue
Screenshot:
Types of changes